.class public Lcom/renren/api/connect/android/exception/RenrenAuthError;
.super Ljava/lang/RuntimeException;
.source "RenrenAuthError.java"


# static fields
.field private static final serialVersionUID:J = 0x1L


# instance fields
.field private error:Ljava/lang/String;

.field private errorDescription:Ljava/lang/String;

.field private errorUri:Ljava/lang/String;


# direct methods
.method public constructor <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 0
    .parameter "error"
    .parameter "errorDescription"
    .parameter "errorUri"

    .prologue
    .line 28
    invoke-direct {p0, p2}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V

    .line 29
    iput-object p1, p0, Lcom/renren/api/connect/android/exception/RenrenAuthError;->error:Ljava/lang/String;

    .line 30
    iput-object p2, p0, Lcom/renren/api/connect/android/exception/RenrenAuthError;->errorDescription:Ljava/lang/String;

    .line 31
    iput-object p3, p0, Lcom/renren/api/connect/android/exception/RenrenAuthError;->errorUri:Ljava/lang/String;

    .line 32
    return-void
.end method

.method public static genJSONObjectError(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/json/JSONObject;
    .locals 3
    .parameter "error"
    .parameter "errorUri"
    .parameter "errorDescription"

    .prologue
    .line 40
    if-nez p0, :cond_0

    const-string p0, ""

    .line 41
    :cond_0
    if-nez p1, :cond_1

    const-string p1, ""

    .line 42
    :cond_1
    if-nez p2, :cond_2

    const-string p2, ""

    .line 43
    :cond_2
    new-instance v1, Lorg/json/JSONObject;

    invoke-direct {v1}, Lorg/json/JSONObject;-><init>()V

    .line 45
    .local v1, errorObj:Lorg/json/JSONObject;
    :try_start_0
    const-string v2, "error"

    invoke-virtual {v1, v2, p0}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 46
    const-string v2, "error_uri"

    invoke-virtual {v1, v2, p1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 47
    const-string v2, "error_description"

    invoke-virtual {v1, v2, p2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    .line 51
    :goto_0
    return-object v1

    .line 48
    :catch_0
    move-exception v0

    .line 49
    .local v0, e:Lorg/json/JSONException;
    invoke-virtual {v0}, Lorg/json/JSONException;->printStackTrace()V

    goto :goto_0
.end method


# virtual methods
.method public getError()Ljava/lang/String;
    .locals 1

    .prologue
    .line 55
    iget-object v0, p0, Lcom/renren/api/connect/android/exception/RenrenAuthError;->error:Ljava/lang/String;

    return-object v0
.end method

.method public getErrorDescription()Ljava/lang/String;
    .locals 1

    .prologue
    .line 59
    iget-object v0, p0, Lcom/renren/api/connect/android/exception/RenrenAuthError;->errorDescription:Ljava/lang/String;

    return-object v0
.end method

.method public getErrorUri()Ljava/lang/String;
    .locals 1

    .prologue
    .line 63
    iget-object v0, p0, Lcom/renren/api/connect/android/exception/RenrenAuthError;->errorUri:Ljava/lang/String;

    return-object v0
.end method

.method public getJSONObjectError()Lorg/json/JSONObject;
    .locals 3

    .prologue
    .line 35
    iget-object v0, p0, Lcom/renren/api/connect/android/exception/RenrenAuthError;->error:Ljava/lang/String;

    iget-object v1, p0, Lcom/renren/api/connect/android/exception/RenrenAuthError;->errorUri:Ljava/lang/String;

    iget-object v2, p0, Lcom/renren/api/connect/android/exception/RenrenAuthError;->errorDescription:Ljava/lang/String;

    invoke-static {v0, v1, v2}, Lcom/renren/api/connect/android/exception/RenrenAuthError;->genJSONObjectError(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v0

    return-object v0
.end method
